#ifndef GAMEST_H
#define GAMEST_H
#include <time.h>
#include "../utils/Defines.h"

class TextureHandler;
class ExplosionObject;
class WorldObject;
class TargetObject;
class MapObject;
class FotoIdObject;
class SmokeObject;
class DustObject;

//classe che mantiene lo stato delle opzioni principali del gioco
class GameStatus
{
public:     
    int score;
    bool luce;
    int schermo_intero;
    int filter;
    int Pmode;
    bool motionblur;
    float blurfactor;    
    double cam_posX; 
    double cam_posY;
    double cam_posZ;
    double cam_fut_posY;
    
    double cam_angX;
    double cam_angY;
    double cam_angZ;
    float fly_height;
    
    int moving;
    int rotating;
    int translating;
    bool takeoff;
    bool gameend;
    bool rightbuttondown;
    bool leftbuttondown;
    bool camera_pos; 
    
    TextureHandler * th;
    ExplosionObject * explosions[MAX_EXP_NUM];
    SmokeObject * smokes[MAX_SMOKE_NUM];
    DustObject * dusts[MAX_DUST_NUM];
    TargetObject * targ;
    WorldObject * world;
    FotoIdObject * fotoid;
    MapObject * map;
    GLUquadricObj * quad_obj;   // Spazio per gli oggetti quadratici    
    
    
    int explosions_counter;
    int smoke_counter;
    int dust_counter;
    int int_time;
    time_t pausetime;
    time_t time;
    
GameStatus(){
    LoadNewState();
    
    world = NULL;
    targ = NULL;
    quad_obj = gluNewQuadric(); 
    gluQuadricNormals(quad_obj, GLU_SMOOTH);           // Crea le Normali Smooth
    gluQuadricTexture(quad_obj, GL_TRUE);   
}
 
 void LoadNewState()
 {
    luce = true;
    blurfactor = MIN_BLUR;
    cam_posX = 0;
    cam_posY = 0;
    schermo_intero = 0;
    cam_angZ = 0;
    cam_angY = 0;
    cam_angX = 0;
    moving = 0;
    rotating = 0;
    translating = 0;
    filter = 0;
    Pmode = 0;
    takeoff = false;
    gameend = false;
    motionblur = false;
    explosions_counter = 0;
    smoke_counter = 0;
    dust_counter = 0;
    fly_height = FLY_HEIGHT;
    rightbuttondown = false;
    leftbuttondown = false;
    camera_pos = true; 
    
  }

virtual ~GameStatus(){};
};

#endif
